local function addTarget(t)
  target(t)
    set_targetdir("../bin")
    add_includedirs("..", "../3rd/nuklear", "../3rd/sdl", "../3rd/glad/include")
    add_packages("SDL2")
    if is_os("windows") then
      add_links("OpenGL32")
    else
      add_links("OpenGL")
    end
    add_deps("glad")
    set_kind("binary")
    add_files("*.cc")
    add_files(t .. "/**.cc")
  target_end()
end

target("glad")
  set_targetdir("../bin")
  add_includedirs("../3rd/glad/include")
  set_kind("static")
  add_files("../3rd/glad/src/*.c")
target_end()

addTarget("demo")